package com.ffcc.fitness.common.constant;

/**
 * 点赞和评论目标类型常量
 */
public class TargetTypeConstant {
    
    /**
     * 首页器械卡片 (equipment_card表)
     */
    public static final int EQUIPMENT_CARD = 1;
    
    /**
     * 课程 (course表)
     */
    public static final int COURSE = 2;
    
    /**
     * 交易商品器械卡片 (trade表)
     */
    public static final int TRADE = 3;
    
    /**
     * 获取目标类型描述
     * @param targetType 目标类型
     * @return 目标类型描述
     */
    public static String getTargetTypeDesc(int targetType) {
        switch (targetType) {
            case EQUIPMENT_CARD:
                return "首页器械卡片";
            case COURSE:
                return "课程";
            case TRADE:
                return "交易商品器械卡片";
            default:
                return "未知类型";
        }
    }
    
    /**
     * 验证目标类型是否有效
     * @param targetType 目标类型
     * @return 是否有效
     */
    public static boolean isValidTargetType(int targetType) {
        return targetType == EQUIPMENT_CARD || targetType == COURSE || targetType == TRADE;
    }
}
